var Datastore = require('nedb');

let getDB = function (dbName) {
    let db = {};
    let options = {
        filename:'./db/'+dbName+'.db',
        autoload:true,
        // nodeWebkitAppName:'web_three'
    };
    db[dbName] = new Datastore(options);
    db[dbName].loadDatabase();
    return db[dbName];
};

module.exports.getDB = getDB;
